package cn.wolfcode.student.service.impl;


import cn.wolfcode.student.entity.Student;
import cn.wolfcode.student.mapper.StudentMapper;
import cn.wolfcode.student.service.IStudentService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {

    @Autowired(required = false)
    private StudentMapper studentMapper;


    @Override
    public Student getByName(String username) {
        QueryWrapper<Student> wrapper=new QueryWrapper<>();
        wrapper.eq("username",username);
        return studentMapper.selectOne(wrapper);
    }
}
